package cn.hinglo.gameclaw.user.bean;

import lombok.Data;
import org.apache.ibatis.type.JdbcType;
import tk.mybatis.mapper.annotation.ColumnType;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import java.util.Date;

/**
 * @createTime: 2017/12/28
 * @author: HingLo
 * @description: 用户签到管理，每日登录后，就将登录的信息放入到是实体中
 */
@Data
@Table(name = "sign")
public class Sign {
    /**
     * //签到ID
     */
    @Id
    private Long id;

    /**
     * 用户的id @Column(name = "user_id")
     */

    private String userId;

    @ColumnType(jdbcType = JdbcType.DATE)
    private Date date;
    /**
     * //钻石数量
     */
    @Max(value = 10, message = "钻石的数量异常，请检测数据是否正确")
    @Min(value = 1, message = "钻石的数量异常，请检测数据是否正确")
    private Integer gold;

}
